// Stopped.cs
//

namespace ServiceAdmin.Status
{
	using ServiceAdmin;
	using ServiceAdmin.Config;
	using System.ServiceProcess;

	public class Stopped : ServiceStatus
	{
		public override string ImagePath
		{
			get { return OptionHandler.Instance.ImagePath + "stop.ico"; }
		}


		public override string StatusDescription
		{
			get { return OptionHandler.Instance.GetLanguageRes("Stopped"); }
		}


		public Stopped(StatusCollection statusCollection) : base(ServiceControllerStatus.Stopped, statusCollection)
		{
		}


		public override void OnActivate()
		{
			if (_statusCollection.CurrentStatus.Status.Equals(Status))
			{
				_statusCollection.Handler.StartButton.Enabled = true;
				_statusCollection.Handler.ResetButton.Enabled = false;
				_statusCollection.Handler.StopButton.Enabled = false;

				UpdateTaskIcon();
			}
		}
	}
}